
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={dede:global.cfg_soft_lang/}" />
<title>{dede:field.title /}</title>
<meta name="description" content="{dede:global.cfg_description/}" />
<meta name="keywords" content="{dede:global.cfg_keywords/}" />

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="{dede:global.cfg_templets_skin/}/js/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="{dede:global.cfg_templets_skin/}/js/bootstrap.min.js"></script>
<script src="{dede:global.cfg_templets_skin/}/js/pub_method.js"></script>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="{dede:global.cfg_templets_skin/}/web/css/bootstrap.min.css">
<link rel="stylesheet" href="{dede:global.cfg_templets_skin/}/web/css/list.css">
<script>
	var url = window.location.href;
	function onclickSearchbutton(param, value){
		var ulDiv = $('#ul-' + value + '');
		var preVal = $('li[name="' + value + '"]').attr('data-preValue');
		var addontype = getUrlParam("addontype");
		if(addontype != value){
			if(ulDiv.length == 0){
				var pre = $('li[name="' + value + '"]').parents('li.li-0').attr('data-preValue');
				if(preVal != pre){
					$('.ul-0').remove();
				}
				$.ajax({
					url:'productMenuAjax.php',
					type:'post',
					data:{disorder:value},
					async : false,
					success: function(row){
						if(row == "notData"){
							if(param == 'addontype'){
								url = replaceUrl(url, '&addonMenu=', '&addonMenu='+preVal);
								url = replaceUrl(url, '&addontype=', '&addontype='+value);
							}
							
							location.href = url;
						}else{
							$('li.selected').removeClass('selected');
							$('li[name="' + preVal + '"]').addClass('selected');
							var html = "<ul>";
							$.each(eval(row), function(i, val){
								html += '<li data-preValue="' + preVal + '" name="' + val.evalue + '"><div onclick="onclickSearchbutton(\'addontype\',\'' + val.evalue + '\');" class="li-' + val.disorder + '">└─  ' + val.ename + '</div></li>';
							});
							html += "</ul>";
							$('li[name="' + value + '"]').append('<div class="ul-0" id="ul-' + value + '"></div>');
							$('#ul-' + value + '').html(html);
						}
					}
				});
			}else{
				var li = $('li.selected');
				if(value == li.attr('name')){
					li.removeClass('selected');
				}
				ulDiv.remove();
			}
		}else{
			var li = $('li.selected');
			if(value == li.attr('name')){
				li.removeClass('selected');
			}
			li.find('.ul-0').remove();
		}
		
	};
	
	if(url.indexOf('&addonMenu=') == -1){
		url = replaceUrl(url, '&addonMenu=', '&addonMenu=500');
		location.href = url;
		
	}
	
	function selPageSize(obj){
		var pageSize = obj.value;
		url = replaceUrl(url, '&PageNo=', '&PageNo=' + pageSize);
		location.href = url;
	}
</script>
</head>
<body>
<div class="container-fluid">
{dede:include filename="tw/head.htm"/}
<!-- /header -->
<div class="content">
	<div class="banner"> 
		<img src="{dede:global.cfg_templets_skin/}/web/images/list/banner.png"/>
    </div>
	<div class="list-body"> 
		<div class="list-tit">
			<h4>{dede:field.typename /}</h4>
			<ul>
				<li>您的位置:</li>
				<li class="address">首页</li>
				<li class="address">{dede:field.typename /}</li>
			</ul>
		</div>
		<div class="list-content">
			<div class="list-left">
				<h4>分類</h4>
				<ul>
					{dede:sql sql="select * from dede_sys_enum where egroup = 'addontype' and disorder = '0' "}
						<li data-preValue="[field:evalue/]" name="[field:evalue/]" class="li-0 [field:evalue runphp='yes']if($_GET['addonMenu']==@me)@me='active';else '';[/field:evalue]">
							<div class="li-1" onclick="onclickSearchbutton('addontype','[field:evalue/]');">[field:ename/]</div>
						</li>
					{/dede:sql}
				</ul>
			</div>
			<div class="list-right">
				<div class="right-img">
					{dede:arclist addfields='addontype' channelid='6' row='9'}
						<a href="/plus/view.php?aid=[field:id/]"><img src="[field:litpic/]" /></a>
					{/dede:arclist}
				</div>
				<div class="page">
					<div class="page-ul">
						<ul>{dede:pagelist size='9'/}
						</ul>
					</div>
				</div>
			</div>
		</div>
    </div>
</div>
{dede:include filename="tw/footer.htm"/}
<!-- /footer -->
</div>
</body>
</html>